import Vue from "vue"
import VueRouter from "vue-router"

Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    redirect: '/login'
    // redirect: '/ems'
  },
  {
    path: '/login',
    component: () => import('@/views/Login')
  },
  // 超管后台123
  {
    path: '/sms',
    name: "Sms",
    redirect: '/sms/index',
    component: () => import('@/views/Sms'),
    children: [
      {
        path: '/sms/index',
        name: 'SmsIndex',
        component: () => import('@/views/Sms/SmsIndex')
      },
      {
        path: '/sms/Editoms',
        name: 'SmsEditoms',
        component: () => import('@/views/Sms/SmsEditoms')
      },
      {
        path: '/sms/pmsList',
        name: 'SmspmsList',
        component: () => import('@/views/Sms/SmspmsList')
      },
      {
        path: '/sms/emsList',
        name: 'SmsemsList',
        component: () => import('@/views/Sms/SmsemsList')
      },
      {
        path: '/sms/SmsMessage',
        name: 'SmsMessage',
        component: () => import('@/views/Sms/SmsMessage')
      },
      {
        path: '/sms/appAdmin',
        name: 'SmsAppAdmin',
        component: () => import('@/views/Sms/SmsAppAdmin')
      },
      {
        path: '/sms/trade',
        name: 'SmsTrade',
        component: () => import('@/views/Sms/SmsTrade')
      },
      {
        path: '/sms/orderManage',
        name: 'orderManage',
        component: () => import('@/views/Sms/workOrder/orderManage')
      },
      {
        path: '/sms/orderCount',
        name: 'orderCount',
        component: () => import('@/views/Sms/workOrder/orderCount')
      },
      {
        path: '/sms/assignOrder',
        name: 'assignOrder',
        component: () => import('@/views/Sms/workOrder/assignOrder')
      },
      {
        path: '/sms/orderDetail',
        name: 'orderDetail',
        component: () => import('@/views/Sms/workOrder/orderDetail')
      },
      {
        path: 'sms/studioData',
        name: 'studioData',
        component: () => import('@/views/Sms/workOrder/studioData')
      },
      {
        path: '/sms/verificationWords',
        name: 'verificationWords',
        component: () => import('@/views/Sms/verificationWords')
      }
    ]
  },
  // 贴牌后台
  {
    path: '/oms',
    name: 'Oms',
    redirect: '/oms/index',
    component: () => import('@/views/Oms'),
    children: [
      {
        path: '/oms/index',
        name: 'OmsIndex',
        component: () => import('@/views/Oms/OmsIndex')
      },
      {
        path: '/oms/Editpms',
        name: 'OmsEditpms',
        component: () => import('@/views/Oms/OmsEditpms')
      },
      {
        path: '/oms/emsList',
        name: 'OmsemsList',
        component: () => import('@/views/Oms/OmsemsList')
      },
      {
        path: '/oms/use',
        name: 'OmsUse',
        component: () => import('@/views/Oms/UseTutorials')
      }
    ]
  },
  // 代理后台
  {
    path: '/pms',
    name: 'Pms',
    redirect: '/pms/index',
    component: () => import('@/views/Pms'),
    children: [
      {
        path: '/pms/index',
        name: 'PmsIndex',
        component: () => import('@/views/Pms/PmsIndex')
      },
      {
        path: '/pms/Editpms',
        name: 'PmsEditpms',
        component: () => import('@/views/Pms/PmsEditpms')
      },
      {
        path: '/pms/emsList',
        name: 'PmsemsList',
        component: () => import('@/views/Pms/PmsemsList')
      }
    ]
  },
  // 企业后台
  {
    path: '/ems',
    name: 'Ems',
    redirect: '/ems/index',
    component: () => import('@/views/Ems'),
    children: [
      {
        path: '/ems/index',
        component: () => import('@/views/Ems/EmsIndex')
      },
      {
        path: '/ems/emsInfo',
        component: () => import('@/views/Ems/EmsInfo')
      },
      {
        path: '/ems/autoMission',
        name: 'EmsAutoMission',
        component: () => import('@/views/Ems/EmsAutoMission')
      },
      {
        path: '/ems/dataUpd',
        component: () => import('@/views/Ems/DataUpd')
      },
      {
        path: '/ems/wordsSet',
        component: () => import('@/views/Ems/WordsSet')
      },
      {
        path: '/ems/taskDetails',
        component: () => import('@/views/Ems/TaskDetails')
      },
      {
        path: '/ems/use',
        component: () => import('@/views/Ems/use')
      },
      {
        path: '/ems/decode',
        component: () => import('@/views/Ems/decode')
      },
      {
        path: '/ems/userPhone',
        component: () => import('@/views/Ems/UserPhone')
      },
      {
        path: '/ems/mapExtension',
        component: () => import('@/views/Ems/MapExtension')
      },
      {
        path: '/ems/VideoSynthesis/LongTailWords',
        component: () => import('@/views/Ems/VideoSynthesis/LongTailWords')
      },
      {
        path: '/ems/VideoSynthesis/MaterialManagement',
        component: () => import('@/views/Ems/VideoSynthesis/MaterialManagement')
      },
      {
        path: '/ems/VideoSynthesis/PictureManagement',
        component: () => import('@/views/Ems/VideoSynthesis/PictureManagement')
      },
      {
        path: '/ems/VideoSynthesis/VideoManagement',
        component: () => import('@/views/Ems/VideoSynthesis/VideoManagement')
      },
      {
        path: '/ems/VideoSynthesis/CreateVideo',
        component: () => import('@/views/Ems/VideoSynthesis/CreateVideo')
      },
      {
        path: '/ems/VideoSynthesis/CreateTailWord',
        component: () => import('@/views/Ems/VideoSynthesis/CreateTailWord')
      },
      {
        path: '/ems/VideoSynthesis/CustomUploadVideo',
        component: () => import('@/views/Ems/VideoSynthesis/CustomUploadVideo')
      },
      {
        name: 'materialUpdateVideoDetail',
        path: '/ems/VideoSynthesis/updateVideoDetail',
        component: () => import('@/views/Ems/VideoSynthesis/updateVideoDetail')
      }
    ]
  },
  // 404
  {
    path: '/404',
    component: () => import('@/views/404')
  },
  //空白页
  {
    path: '/returnAPP',
    component: () => import('@/views/returnAPP')
  }
]

const router = new VueRouter({
  routes,
})

export default router
